#!/usr/bin/env python
# -*- coding:utf-8 -*-
import base
from web import models


def run():
    if not models.PricePolicy.objects.filter(category=1, title="个人免费版").exists():
        models.PricePolicy.objects.create(
            category=1,
            title="个人免费版",
            price=0,
            project_num=5,
            project_member=2,
            project_space=20,
            per_file_size=5
        )
    if not models.PricePolicy.objects.filter(category=2, title="VIP版").exists():
        models.PricePolicy.objects.create(
            category=2,
            title="VIP版",
            price=100,
            project_num=50,
            project_member=40,
            project_space=50,
            per_file_size=500
        )

    if not models.PricePolicy.objects.filter(category=2, title="SVIP版").exists():
        models.PricePolicy.objects.create(
            category=2,
            title="SVIP版",
            price=200,
            project_num=150,
            project_member=100,
            project_space=100,
            per_file_size=1024
        )

    if not models.PricePolicy.objects.filter(category=2, title="SSVIP版").exists():
        models.PricePolicy.objects.create(
            category=2,
            title="SSVIP版",
            price=500,
            project_num=100,
            project_member=200,
            project_space=400,
            per_file_size=4048
        )

if __name__ == '__main__':
    run()
